<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: {method: :put, class: 'form-signin'}) do |f| %>
  <%= render "devise/shared/error_messages", resource: resource %>
  <div class="text-center mb-4">
    <h1 class="h3 mb-3 font-weight-normal">编辑用户</h1>
  </div>
  <div class="form-label-group">
    <%= f.label :email, "邮箱" %><br/>
    <%= f.email_field :email, autofocus: true, autocomplete: "email", required: true, class: 'form-control', placeholder: "邮箱" %>
  </div>

  <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
    <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
  <% end %>

  <div class="form-label-group">
    <%= f.label :password, "密码" %>
    <% if @minimum_password_length %>
      <em>(最少 <%= @minimum_password_length %> 个字符)</em>
    <% end %><br/>
    <%= f.password_field :password, autocomplete: "new-password", class: 'form-control', placeholder: "密码" %>
  </div>

  <div class="form-label-group">
    <%= f.label :password_confirmation, "确认密码" %><br/>
    <%= f.password_field :password_confirmation, autocomplete: "new-password", class: 'form-control', placeholder: "确认密码" %>
  </div>

  <div class="form-label-group">
    <%= f.label :current_password, "当前密码" %> <i>(我们需要您当前的密码来确认您的更改)</i><br/>
    <%= f.password_field :current_password, autocomplete: "current-password", required: true, class: 'form-control', placeholder: "当前密码" %>
  </div>
  <div class="form-label-group">
    <%= f.submit "更新", class: 'btn btn-lg btn-primary btn-block', id: 'register-submit' %>
  </div>


<% end %>
